<template>
	<view>
		<view class="area-title">
			<text>(指标不合格数目/待审核数目/未提交学校数目)</text>
		</view>
		<view class="area-city">
			<text class="city">贵阳市</text>
		</view>
		<view class="area-region" v-for="(item,index) in areaRegion" :key="index" @click="selectSchool(item)">
			<text class="region">{{item.content}}</text>
		</view>
	</view>
</template>

<script>
	import {
		getImprovedArea
	} from "../../../api/supervise/work.js"
	export default {
		data() {
			return {
				areaRegion: []
			}
		},
		methods: {
			selectSchool(item) {
				uni.setStorageSync("areaId", item.areaId);

				this.$tab.navigateTo("/pages/work/schoolFeedback/school");
			}
		},
		onLoad: function() {
			let activityId = uni.getStorageSync("activityId");

			getImprovedArea(activityId).then(res => {
				console.log(res)

				let areas = res.areas;

				for (let i = 0; i < areas.length; i++) {
					this.areaRegion.push({
						content: areas[i].name + "(" + areas[i].countImprove + "/" + areas[i]
							.countActivity + "/" + "0" + ")",
						areaId: areas[i].code
					})
				}

			})


		}
	}
</script>

<style lang="scss" scoped>
	.area-title {
		text-align: center;
		height: 6vh;
		line-height: 6vh;
		background-color: #fff;
	}

	.area-city {
		height: 6vh;
		line-height: 6vh;

		.city {
			padding-left: 5px;
		}
	}

	.area-region {
		text-align: center;
		border-top: 1px solid #F2F2F0;
		background-color: #fff;
		height: 6vh;
		line-height: 6vh;
	}
</style>